home *** CD-ROM | disk | FTP | other *** search
- property scrollmode, Sp, cStart
- global currentMember, pointClicked, wordNum, wordText2, wordText
-
- on mouseDown me
- scrollmode = "scroll"
- cStart = sprite(me.spriteNum).top + (sprite(me.spriteNum).height / 2)
- end
-
- on mouseUpOutSide me
- scrollmode = "off"
- end
-
- on mouseUp me
- scrollmode = "off"
- wordText = currentMember.word[wordNum]
- if wordText contains "@" then
- gotoNetPage("mailto:" & wordText)
- else
- nothing()
- end if
- if wordText.char[1..7] = "http://" then
- gotoNetPage(wordText)
- else
- nothing()
- end if
- if wordText.char[1..8] = "https://" then
- gotoNetPage(wordText)
- else
- nothing()
- end if
- if wordText.char[1..4] = "www." then
- gotoNetPage("http://" & wordText)
- else
- nothing()
- end if
- end
-
- on linkUpdate me
- t = sprite(me.spriteNum).member
- repeat with i = 1 to t.word.count
- if (t.word[i].char[1..7] = "http://") or (t.word[i] contains "@") or (t.word[i].char[1..4] = "www.") or (t.word[i].char[1..8] = "https://") then
- t.word[i].color = rgb(204, 204, 204)
- end if
- end repeat
- end
-
- on exitFrame me
- if scrollmode = "scroll" then
- sprite(me.spriteNum).member.scrollTop = sprite(me.spriteNum).member.scrollTop + ((the mouseV - cStart) / 10)
- end if
- end
-
- on mouseWithin me
- cursor(260)
- pointClicked = the mouseLoc
- currentMember = sprite(me.spriteNum).member
- wordNum = sprite(me.spriteNum).pointToWord(pointClicked)
- if wordNum <> -1 then
- wordText2 = currentMember.word[wordNum]
- if (wordText2.char[1..7] = "http://") or (wordText2 contains "@") or (wordText2.char[1..4] = "www.") or (wordText2.char[1..8] = "https://") then
- cursor(280)
- else
- cursor(260)
- end if
- end if
- end
-
- on mouseLeave
- cursor(-1)
- end
-